package model;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;

/**
 * 
 * An abstract class which contains the things a bullet
 * 
 * @author Niklas
 *
 */

public abstract class AbstractBullet {

	private int damage;
	private double xSpeed;
	private double ySpeed;
	private Dimension size;
	private double x;
	private double y;
		
	
	public AbstractBullet(int damage, double xSpeed, double ySpeed, double x, double y, Dimension size) {
		this.damage = damage;
		this.xSpeed = xSpeed;
		this.ySpeed = ySpeed;
		this.x = x;
		this.y = y;
		this.size = size;
	}
	
	
	/**
	 * @return the x
	 */
	public double getX() {
		return x;
	}


	/**
	 * @param x the x to set
	 */
	public void setX(double x) {
		this.x = x;
	}


	/**
	 * @return the y
	 */
	public double getY() {
		return y;
	}


	/**
	 * @param y the y to set
	 */
	public void setY(double y) {
		this.y = y;
	}


	/**
	 * @return the size
	 */
	public Dimension getSize() {
		return size;
	}


	public int getDamage() {
		return damage;
	}

	
	public void setDamage(int damage) {
		this.damage = damage;
	}

	
	public double getXSpeed() {
		return xSpeed;
	}

	
	public void setXSpeed(double xSpeed) {
		this.xSpeed = xSpeed;
	}
	
	
	public double getYSpeed() {
		return ySpeed;
	}

	
	public void setYSpeed(double ySpeed) {
		this.ySpeed = ySpeed;
	}
	
	public void addXSpeed(double speed) {
		this.xSpeed = this.xSpeed + speed;
	}

	public double addYSpeed(double ySpeed) {
		return this.ySpeed = this.ySpeed + ySpeed;
	}
	
	public void draw(Graphics g){
		g.setColor(Color.black);
		g.fillOval((int)(x+0.5),(int)(y+0.5), size.width, size.height);
	}
	
	
}
